<?php
include("include/config.inc.php");
if(!isset($_SESSION['s_activIdsAdmin']) && !isset($_SESSION['s_activIdsAdmin2']))
{
	header("Location:checkLogin.php");
}
else
{
	$k=0;
	$invoiceArray = array();
  $selectInvoice = "SELECT invoiceId,invoiceNo
	                    FROM invoice
	                   WHERE contractId = ".$_REQUEST['contractId'];
	$selectInvoiceRes = mysql_query($selectInvoice);
	while($invoiceRow = mysql_fetch_array($selectInvoiceRes))
	{
		$invoiceArray['invoiceId'][$k] = $invoiceRow['invoiceId'];
		$invoiceArray['invoiceNo'][$k] = $invoiceRow['invoiceNo'];
		$k++;
	}
}
include("bottom.php");
$smarty->assign("invoiceArray",$invoiceArray);
$smarty->display("setInvoice.tpl");
?>